package com.ebupt.login

import com.alibaba.android.arouter.facade.annotation.Route
import org.koin.androidx.viewmodel.ext.android.viewModel
import com.blankj.utilcode.util.ToastUtils
import com.ebupt.common.base.BaseActivity
import com.ebupt.login.databinding.ActivityLoginBinding
import com.ebupt.service.Navigation

@Route(path = Navigation.DB_URL)
class LoginActivity:BaseActivity<ActivityLoginBinding>() {

    private val loginViewModel:LoginViewModel by viewModel<LoginViewModel> ()

    override fun getLayoutId(): Int =R.layout.activity_login

    override fun initData() {
        super.initData()
        viewDataBinding.vm = loginViewModel
        loginViewModel.netResponse.observerKt {
            if (it!=null){
                ToastUtils.showLong(it.toString())
            }
        }
    }

}